<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<style>
.a{ display:block;margin-left:10px;}
.div{ margin-left:10px; text-align:left;}
.div_t2{}
.left{ text-align:left !important;}
.l_add2{ background:url(${ctx}/images/index/l_add2.gif) no-repeat; padding-left:15px;}
.l_dec2{ background:url(${ctx}/images/index/l_dec2.gif) no-repeat; padding-left:15px;}
.font14 {font-size: 14px;font-weight: bold;color: #005C7B;background-color: #C8DDF0;text-align: left;text-indent: 10px;padding-top: 5px;border-bottom-width: 1px;border-bottom-style: solid;border-bottom-color: #94BDE2;}
.bodysy {font-size: 12px;line-height: 20px;color: #333333;}
.bodysy a {font-size: 12px;line-height: 20px;color: #333333;text-decoration: none;}
.bodysy a:link {font-size: 12px;line-height: 20px;color: #333333;text-decoration: none;}
.bodysy a:visited {font-size: 12px;line-height: 20px;color: #333333;text-decoration: none;}
.float_l{ float:left !important;}
.float_r{ float:right !important;}
.bodysy a:hover {
	font-size: 12px;
	line-height: 20px;
	color: #333333;
	text-decoration: none;
	background-color: #C8DDF0;
}
.bodysy a:active {font-size: 12px;line-height: 20px;color: #333333;text-decoration: none;}

.div090213 {
	line-height: 22px;
	border-bottom-width: 1px;
	border-bottom-style: dotted;
	border-bottom-color: #CCCCCC;
	clear: both;
}
</style>

<link href="${ctx}/css/main/base.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/css/main/main.css" rel="stylesheet" type="text/css" />
</head>
<body class="bodysy">
<table width="98%" height="100%" border="0" cellpadding="0" cellspacing="0" class="tab_m">
			  <tr>
			    <td height="30" colspan="2" class="ml_add left" ><a href="${ctx}/menu/menu!preCreate.action" target="mright">增加菜单主分类</a></td>
			  </tr>
				<tr>
				<td height="30" colspan="2" class="left" >
				<s:iterator value="sysMenus" status="agent" id="r">			
				<div class="div090213">
				<div class="div090213">
				<span class="float_l">
				<img src="${ctx}/images/index/l_add2.gif" id="Iid<s:property value='#agent.index+1'/>" onclick="showSub('id<s:property value='#agent.index+1'/>');" /> 
				<span style="cursor: pointer;" href="#"  onclick="showSub('id<s:property value='#agent.index+1'/>');" ><img src="${ctx}/images/menu/${menuImage}.gif"/>${menuName }</span> 
				</span>
				<span class="float_r">
				<span onclick=" modifyMenu('${menuId}');" style="cursor: pointer;"><img src="${ctx}/images/index/pencil.png" alt="编辑" border="0" align="absmiddle" /></span> <a href="${ctx}/menu/menu_manageFunc.action?sysMenu.menuId=${menuId}" target="mright"><img src="${ctx}/images/index/0114.gif" alt="下一级" border="0" align="absmiddle"/></a>
				<span onclick=" deleteMenu('${menuId}');" style="cursor: pointer;"><img src="${ctx}/images/index/del1.gif" alt="删除" border="0" align="absmiddle"/></span>
				</span>
				</div>
				<div id="id<s:property value='#agent.index+1'/>" style="display:none;" class="div090213">						
						<s:iterator value="#r.sysFuncs" status="user" id="u1">						
						<div  style="margin-left:15px;" class="div090213">
						<div class="div090213">
						<span class="float_l">
						<img src="${ctx}/images/index/l_add2.gif"  id="Iid<s:property value='#agent.index+1'/><s:property value='#user.index+1'/>" onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/>');" /> 
						<span style="cursor: pointer;" href="#"  onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/>');" ><img src="${ctx}/images/menu/${menuImage}.gif"/><s:property value="funcName"/> </span>
						</span>
						<span class="float_r">
						<span onclick="modifyFunc('${funcId}');" style="cursor: pointer;"><img src="${ctx}/images/index/pencil.png"  alt="编辑" border="0" align="absmiddle"  /></span> <a href="${ctx}/func/func_manageFunc.action?sysFunc.funcId=${funcId}&sysMenu.menuId=${menuId}" target="mright"><img src="${ctx}/images/index/0114.gif" alt="下一级" border="0" align="absmiddle" /></a> <span onclick=" deleteFunc('${funcId}');" style="cursor: pointer;"><img src="${ctx}/images/index/del1.gif" alt="删除" border="0" align="absmiddle" /></span>
						</span>
						</div>
							<div id="id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/>" style="display:none" class="div090213">								
								<s:iterator value="#u1.sysFuncs" status="user1" id="u2">
								<div  style="margin-left:18px;" class="div090213">
								<div class="div090213">
								<span class="float_l">
								<img src="${ctx}/images/index/l_add2.gif" id="Iid<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/>" onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/>');" />
								<span style="cursor: pointer;" href="#"  onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/>');" ><img src="${ctx}/images/menu/${menuImage}.gif"/><s:property value="funcName"/> </span>
								</span>
								<span class="float_r">
								<span onclick="modifyFunc('${funcId}');" style="cursor: pointer;"><img src="${ctx}/images/index/pencil.png"  alt="编辑" border="0" align="absmiddle"  /></span> <a href="${ctx}/func/func_manageFunc.action?sysFunc.funcId=${funcId}&sysMenu.menuId=${menuId}" target="mright"><img src="${ctx}/images/index/0114.gif" alt="下一级" border="0" align="absmiddle" /></a> <span onclick="deleteFunc('${funcId}');" style="cursor: pointer;"><img src="${ctx}/images/index/del1.gif" alt="删除" border="0" align="absmiddle" /></span>
								 </span> 
								 </div>   
								     <div id="id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/>" style="display:none" class="div090213">
										<s:iterator value="#u2.sysFuncs" status="user2" id="u3">
										<div  style="margin-left:21px;" class="div090213">
										<span class="float_l">
										<img src="${ctx}/images/index/l_add2.gif" id="Iid<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/>" onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/>');" />
										<span style="cursor: pointer;" href="#"  onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/>');"  ><img src="${ctx}/images/menu/${menuImage}.gif"/><s:property value="funcName"/> </span>
										</span>
										<span class="float_r">
										<span onclick="modifyFunc('${funcId}');" style="cursor: pointer;"><img src="${ctx}/images/index/pencil.png"  alt="编辑" border="0" align="absmiddle"  /></span> <a href="${ctx}/func/func_manageFunc.action?sysFunc.funcId=${funcId}&sysMenu.menuId=${menuId}" target="mright"><img src="${ctx}/images/index/0114.gif" alt="下一级" border="0" align="absmiddle" /></a> <span onclick="deleteFunc('${funcId}');" style="cursor: pointer;"><img src="${ctx}/images/index/del1.gif" alt="删除" border="0" align="absmiddle" /></span>
										</span>	
											<div class="div090213" id="id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/>" style="display:none">
												<s:iterator value="#u3.sysFuncs" status="user3" id="u4">
												<div  style="margin-left:27px;" class="div090213">
												<span class="float_l">
												<img src="${ctx}/images/index/l_add2.gif"  id="Iid<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/>" onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/>');" />
												<span style="cursor: pointer;" href="#"  onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/>');"  ><img src="${ctx}/images/menu/${menuImage}.gif"/><s:property value="funcName"/></span> 
												</span>
												<span class="float_r">
												<span onclick=" modifyFunc('${funcId}');" style="cursor: pointer;"><img src="${ctx}/images/index/pencil.png"  alt="编辑" border="0" align="absmiddle"  /></span> <a href="${ctx}/func/func_manageFunc.action?sysFunc.funcId=${funcId}&sysMenu.menuId=${menuId}" target="mright"><img src="${ctx}/images/index/0114.gif" alt="下一级" border="0" align="absmiddle" /></a> <span onclick="deleteFunc('${funcId}');" style="cursor: pointer;"><img src="${ctx}/images/index/del1.gif" alt="删除" border="0" align="absmiddle" /></span>
												</span>	
													<div class="div090213" id="id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/>" style="display:none">
														<s:iterator value="#u4.sysFuncs" status="user4" id="u5">
														<div class="div090213"  style="margin-left:30px;">
														<span class="float_l">
														<img src="${ctx}/images/index/l_add2.gif" id="Iid<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/><s:property value='#user4.index+1'/>" onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/><s:property value='#user4.index+1'/>');" />
														<span style="cursor: pointer;" href="#"  onclick="showSub('id<s:property value='#agent.index+1'/><s:property value='#user.index+1'/><s:property value='#user1.index+1'/><s:property value='#user2.index+1'/><s:property value='#user3.index+1'/><s:property value='#user4.index+1'/>');"  ><img src="${ctx}/images/menu/${menuImage}.gif"/><s:property value="funcName"/> </span>
														</span>
														<span class="float_r">
														<span onclick="modifyFunc('${funcId}');" style="cursor: pointer;"><img src="${ctx}/images/index/pencil.png"  alt="编辑" border="0" align="absmiddle"  /></span> <a href="${ctx}/func/func_manageFunc.action?sysFunc.funcId=${funcId}&sysMenu.menuId=${menuId}" target="mright"><img src="${ctx}/images/index/0114.gif" alt="下一级" border="0" align="absmiddle" /></a> <span onclick="deleteFunc('${funcId}');" style="cursor: pointer;"><img src="${ctx}/images/index/del1.gif" alt="删除" border="0" align="absmiddle" /></span>														</div>
														</span>
														</s:iterator>
													</div>
												</div>
												</s:iterator>
											</div>
										</div>
										</s:iterator>
									</div>
								</div>
								</s:iterator>
							</div>
						</div>
						</s:iterator>
				  </div>
				</div>
				</s:iterator>				</td>
			</tr>
</table>
</body>
</html>
<script>

function modifyMenu(menuId){
  parent.frames['mright'].location = "${ctx}/menu/menu!preModify.action?sysMenu.menuId="+menuId;
}

function deleteMenu(menuId){
  if(window.confirm('确定要删除该菜单节点吗?')){
  		parent.frames['mright'].location = "${ctx}/menu/menu_delete.action?sysMenu.menuId="+menuId;
  		 parent.frames['mleft'].location = "${ctx}/menu/menu_left.action";
  }
  
}


function modifyFunc(funcId){
  parent.frames['mright'].location = "${ctx}/func/func!preModify.action?sysFunc.funcId="+funcId;
}

function deleteFunc(funcId){
  if(window.confirm('确定要删除该菜单节点吗?')){
  		parent.frames['mright'].location = "${ctx}/func/func_delete.action?sysFunc.funcId="+funcId;
  		 parent.frames['mleft'].location = "${ctx}/menu/menu_left.action";
  }
  
}



function showSub(id){

var obj=document.getElementById(id);
var img=document.getElementById("I"+id);
	if(obj.style.display=="block"){
		obj.style.display="none";
		img.src="${ctx}/images/index/l_add2.gif";
	}
	else{
		obj.style.display="block";
		img.src="${ctx}/images/index/l_dec2.gif"
	}
}
</script>